	<div id="newsnav_wrapper">
		<ul class="newsnav">
			<li class="active"><a href="{$URL_userNoVar}"><span>{#PLIGG_Visual_Name#} User: {$page_header}</span></a></li>
			<li><a href="{$my_base_url}{$my_pligg_base}"><span class="ucase">{#PLIGG_Visual_Published_News#}</span></a></li>
			<li><a href="{$URL_upcoming}"><span class="ucase">{#PLIGG_Visual_Pligg_Queued#}</span></a></li>			
		</ul>
	</div>
	<div class="box user_center">
		<div class="sort clearfix">
			<ul>
				{checkActionsTpl location="tpl_pligg_profile_sort_start"}
				<li class="active{$nav_pd}"><a href="{$user_url_personal_data}"><span>{#PLIGG_Visual_User_PersonalData#}</span></a></li>
				{if $user_login eq $user_logged_in}
				<li class="active{$nav_set}"><a href="{$user_url_setting}"><span>{#PLIGG_Visual_User_Setting#}</span></a></li>
				{/if}
				<li class="active{$nav_ns}"><a href="{$user_url_news_sent}"><span>{#PLIGG_Visual_User_NewsSent#}</span></a></li>
				<li class="active{$nav_np}"><a href="{$user_url_news_published}"><span>{#PLIGG_Visual_User_NewsPublished#}</span></a></li>
				<li class="active{$nav_nu}"><a href="{$user_url_news_unpublished}"><span>{#PLIGG_Visual_User_NewsUnPublished#}</span></a></li>
				<li class="active{$nav_c}"><a href="{$user_url_commented}"><span>{#PLIGG_Visual_User_NewsCommented#}</span></a></li>
				<li class="active{$nav_nv}"><a href="{$user_url_news_voted}"><span>{#PLIGG_Visual_User_NewsVoted#}</span></a></li>
				<li class="active{$nav_s}"><a href="{$user_url_saved}"><span>{#PLIGG_Visual_User_NewsSaved#}</span></a></li>
				{checkActionsTpl location="tpl_pligg_profile_sort_end"}
			</ul>
		</div>
		{checkActionsTpl location="tpl_user_center_just_below_header"}
		{checkActionsTpl location="tpl_pligg_profile_start"}
		{if $user_view eq 'profile'}
		<br />
		{checkActionsTpl location="tpl_pligg_profile_info_start"}
		<fieldset>
			<legend>{#PLIGG_Visual_User_PersonalData#} &amp; {#PLIGG_Visual_User_Profile_User_Stats#}</legend>
			<div class="user_info">
				<table cellpadding="0" cellspacing="0">
					<tr>
						<td width="60%" valign="top">
							{if $UseAvatars neq "0"}<img src="{$Avatar_ImgSrc}" alt="Avatar" class="avatar" />{/if}
							<table cellpadding="0" cellspacing="0">
								<tr>
									<td width="35%"><strong>{#PLIGG_Visual_Login_Username#}:</strong></td>
									<td>{$user_username}</td>
								</tr>									
								{if $user_names ne ""}
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_User#}:</strong></td>
									<td>{$user_names}</td>
								</tr>
								{/if}					
								{if $user_url ne ""}
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_Homepage#}:</strong></td>
									<td><a href="{$user_url}" target="_blank">{$user_url}</a></td>
								</tr>
								{/if}					
								{if $user_publicemail ne ""}
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_PublicEmail#}:</strong></td>
									<td>{$user_publicemail}</td>
								</tr>
								{/if}					
								{if $user_location ne ""}
								<tr>
									<td><strong>{#PLIGG_Visual_Profile_Location#}:</strong></td>
									<td>{$user_location}</td>
								</tr>
								{/if}					
								{if $user_occupation ne ""}
								<tr>
									<td><strong>{#PLIGG_Visual_Profile_Occupation#}:</strong></td>
									<td>{$user_occupation}</td>
								</tr>
								{/if}					
								{if $user_aim ne ""}
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_AIM#}:</strong></td>
									<td>{$user_aim}</td>
								</tr>
								{/if}					
								{if $user_msn ne ""}
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_MSN#}:</strong></td>
									<td>{$user_msn}</td>
								</tr>
								{/if}					
								{if $user_yahoo ne ""}
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_Yahoo#}:</strong></td>
									<td>{$user_yahoo}</td>
								</tr>
								{/if}					
								{if $user_gtalk ne ""}
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_GTalk#}:</strong></td>
									<td>{$user_gtalk}</td>
								</tr>
								{/if}					
								{if $user_skype ne ""}
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_Skype#}:</strong></td>
									<td>{$user_skype}</td>
								</tr>
								{/if}					
								{if $user_irc ne ""}
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_IRC#}:</strong></td>
									<td><a href="{$user_irc}" target="_blank">{$user_irc}</a></td>
								</tr>
								{/if}					
								{if $user_login eq $user_logged_in}
								<tr>
									<td style="border:none;">&nbsp;</td>
									<td style="border:none;">
										<input type="button" value="{#PLIGG_Visual_User_Profile_Modify#}" onclick="location='{$URL_Profile}'" />
									</td>
								</tr>
								{/if}
							</table>
							{checkActionsTpl location="tpl_show_extra_profile"}
						</td>
						<td width="15">&nbsp;</td>
						<td valign="top">
							{checkActionsTpl location="tpl_pligg_profile_info_middle"}
							<img src="{$my_pligg_base}/templates/{$the_template}/images/icons/stats.gif" alt="" class="avatar" />
							<table cellpadding="0" cellspacing="0">
								{if $user_karma > "0.00"}
								<tr>
									<td><strong>{#PLIGG_Visual_Rank#}:</strong></td>
									<td>{$user_rank}</td>
								</tr>
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_KarmaPoints#}:</strong></td>
									<td>{$user_karma}</td>
								</tr>
								{/if}
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_Joined#}:</strong></td>
									<td>{$user_joined}</td>
								</tr>					
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_Total_Links#}:</strong></td>
									<td>{$user_total_links}</td>
								</tr>					
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_Published_Links#}:</strong></td>
									<td>{$user_published_links}</td>
								</tr>					
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_Total_Comments#}:</strong></td>
									<td>{$user_total_comments}</td>
								</tr>					
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_Total_Votes#}:</strong></td>
									<td>{$user_total_votes}</td>
								</tr>					
								<tr>
									<td><strong>{#PLIGG_Visual_User_Profile_Published_Votes#}:</strong></td>
									<td>{$user_published_votes}</td>
								</tr>				
							</table>
						</td>
					</tr>
				</table>
			</div>
		</fieldset>
		{checkActionsTpl location="tpl_pligg_profile_info_end"}
		{if $Allow_Friends neq "0"}
		<fieldset>
			<legend>{#PLIGG_Visual_User_Profile_Friends#}</legend>
			{if $friends}
				<ul class="friends clearfix">
					{foreach from=$friends item=myfriend}
					{php}
						$this->_vars['friend_avatar'] = get_avatar('small', $this->_vars['myfriend']['user_avatar_source'], $this->_vars['myfriend']['user_login'], $this->_vars['myfriend']['user_email']);
						$this->_vars['profileURL'] = getmyurl('user2', $this->_vars['myfriend']['user_login'], 'profile');
						$this->_vars['removeURL'] = getmyurl('user_add_remove', $this->_vars['myfriend']['user_login'], 'removefriend');
					{/php}
					<li>
						<img src="{$friend_avatar}" alt="{$myfriend.user_login} avatar" />
						<a href="{$profileURL}">{$myfriend.user_login}</a>
						{*
						<table cellpadding="0" cellspacing="0">
							<tr>
								<td width="20"><a href="{$profileURL}"><img src="{$friend_avatar}" alt="{$myfriend.user_login} avatar" /></a></td>
								<td><a href="{$profileURL}">{$myfriend.user_login}</a></td>
							</tr>
						</table>*}
					</li>
					{/foreach}
				</ul>
			{else}
				<div class="msg_warning2">{$user_username} {#PLIGG_Visual_User_Profile_No_Friends#}</div>
			{/if}
			{if $Allow_Friends neq "0"}
			{if $user_authenticated eq true}
				<form action="{$my_pligg_base}/user.php" method="get"
				{php}
				global $URLMethod, $my_base_url, $my_pligg_base;
				if ($URLMethod==2) print "onsubmit='document.location.href=\"{$my_base_url}{$my_pligg_base}/user/search/\"+encodeURIComponent(this.keyword.value); return false;'";
				{/php}
				>
					<input type="hidden" name="view" value="search" />
					<input type="text" name="keyword" size="60" />
					<input type="submit" value="{#PLIGG_Visual_User_Search_Users#}" />
				</form>
			{/if}
			{if $user_login neq $user_logged_in}
				{if $is_friend gt 0}
				<div class="msg_warning2">
					<img src="{$my_pligg_base}/templates/{$the_template}/images/icons/user_delete.png" alt="" />
					<a href="{$user_url_remove}"><span class="icon_controls">{#PLIGG_Visual_User_Profile_Remove_Friend#} <strong>{$user_login}</strong> {#PLIGG_Visual_User_Profile_Remove_Friend_2#}</span></a>
					{if $user_authenticated eq true}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{checkActionsTpl location="tpl_user_center"}{/if}
				</div>
				{else}
				{if $user_authenticated eq true}
				<div class="msg_warning2">
					<img src="{$my_pligg_base}/templates/{$the_template}/images/icons/user_add.png" alt="" />
					<a href="{$user_url_add}"><span class="icon_controls">{#PLIGG_Visual_User_Profile_Add_Friend#} <strong>{$user_login}</strong> {#PLIGG_Visual_User_Profile_Add_Friend_2#}</span></a>
				</div>
				{/if}
				{/if}
			{else}
				<div class="msg_warning2">
					<img src="{$my_pligg_base}/templates/{$the_template}/images/icons/friends.png" alt="" />
					<a href="{$user_url_friends}"><span class="icon_controls propercase">{#PLIGG_Visual_User_Profile_View_Friends#}</span></a>
					&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
					<img src="{$my_pligg_base}/templates/{$the_template}/images/icons/friends2.png" alt="" />
					<a href="{$user_url_friends2}"><span class="icon_controls propercase">{#PLIGG_Visual_User_Profile_View_Friends_2#}</span></a>
				</div>
			{/if}
			{/if}
		</fieldset>
		{/if}
		{if $enable_group eq "true"}
		<fieldset>
			<legend>{#PLIGG_Visual_User_Profile_User_Groups#}</legend>
			<ul>
				{$group_display}
			</ul>
		</fieldset>
		{/if}
		{/if}
		{* SEARCH *}
		{if $user_view eq 'search'}
		<br />
		<fieldset>
			<legend>Search Users</legend>
			{if $Allow_Friends neq "0"}
			<form action="{$my_pligg_base}/user.php" method="get"
			{php}
			global $URLMethod, $my_base_url, $my_pligg_base;
			if ($URLMethod==2) print "onsubmit='document.location.href=\"{$my_base_url}{$my_pligg_base}/user/search/\"+encodeURIComponent(this.keyword.value); return false;'";
			{/php}
			>
				<input type="hidden" name="view" value="search" />
				{if $templatelite.get.keyword neq ""}{assign var=searchboxtext value=$templatelite.get.keyword|sanitize:2}{else}{assign var=searchboxtext value=#PLIGG_Visual_Search_SearchDefaultText#}{/if}
				<input type="text" name="keyword" size="50" value="{$searchboxtext}" onfocus="if(this.value == '{$searchboxtext}') {ldelim}this.value = '';{rdelim}" onblur="if (this.value == '') {ldelim}this.value = '{$searchboxtext}';{rdelim}" />
				<input type="submit" value="{#PLIGG_Visual_User_Search_Users#}" />
			</form>
			{/if}
		</fieldset>
		<fieldset>
			<legend>{#PLIGG_Visual_Search_SearchResults#} &quot;<em>{$search}</em>&quot;</legend>
			{if $user_login neq $user_logged_in}
				{if $is_friend gt 0}
				<div class="msg_warning2">
					<img src="{$my_pligg_base}/templates/{$the_template}/images/icons/user_delete.png" alt="" />
					<a href="{$user_url_remove}"><span class="icon_controls">{#PLIGG_Visual_User_Profile_Remove_Friend#} <strong>{$user_login}</strong> {#PLIGG_Visual_User_Profile_Remove_Friend_2#}</span></a>
					{if $user_authenticated eq true}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{checkActionsTpl location="tpl_user_center"}{/if}
				</div>
				{else}
				{if $user_authenticated eq true}
				<div class="msg_warning2">
					<img src="{$my_pligg_base}/templates/{$the_template}/images/icons/user_add.png" alt="" />
					<a href="{$user_url_add}"><span class="icon_controls">{#PLIGG_Visual_User_Profile_Add_Friend#} <strong>{$user_login}</strong> {#PLIGG_Visual_User_Profile_Add_Friend_2#}</span></a>
				</div>
				{/if}
				{/if}
			{else}
				<div class="msg_warning2">
					<img src="{$my_pligg_base}/templates/{$the_template}/images/icons/friends.png" alt="" />
					<a href="{$user_url_friends}"><span class="icon_controls propercase">{#PLIGG_Visual_User_Profile_View_Friends#}</span></a>
					&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
					<img src="{$my_pligg_base}/templates/{$the_template}/images/icons/friends2.png" alt="" />
					<a href="{$user_url_friends2}"><span class="icon_controls propercase">{#PLIGG_Visual_User_Profile_View_Friends_2#}</span></a>
				</div>
			{/if}
			{if $userlist}
			<table cellpadding="0" cellspacing="0" class="search_results">
				<tr>
					<th>{#PLIGG_Visual_Login_Username#}</th>
					<th>{#PLIGG_Visual_User_Profile_Joined#}</th>
					<th>Add/Remove</th>
				</tr>
				{section name=nr loop=$userlist}
				<tr>
					<td>
						<a href="{$URL_user, $userlist[nr].user_login}"><img src="{$userlist[nr].Avatar}" alt="" /></a>
						<span class="search_results_name"><a href="{$URL_user, $userlist[nr].user_login}">{$userlist[nr].user_login}</a></span>
					</td>
					<td>{$userlist[nr].user_date}</td>
					<td>
						{if $userlist[nr].status eq 0}	
						<a href="{$userlist[nr].add_friend}"><img src="{$my_pligg_base}/templates/{$the_template}/images/icons/user_add.png" alt="" /></a>
						{else}
						<a href="{$userlist[nr].remove_friend}"><img src="{$my_pligg_base}/templates/{$the_template}/images/icons/user_delete.png" alt="" /></a>
						{/if}
					</td>	
				</tr>
				{/section}
			</table>
			{else}
			<strong>{#PLIGG_Visual_Search_NoResults#} '{$search}'</strong>
			{/if}
		</fieldset>
		{/if}
		{* VIEW FRIENDS *}
		{if $user_view eq 'viewfriends'}
		<br />
		<fieldset>
			<legend>{#PLIGG_Visual_User_Profile_Your_Friends#}</legend>
			{if $friends}
			<table cellpadding="0" cellspacing="0" class="friends2">
				<th align="left" colspan="2">{#PLIGG_Visual_User_Profile_Username#}</th>
				<th width="60">{#PLIGG_Visual_User_Profile_Message#}</th>
				<th width="60">{#PLIGG_Visual_User_Profile_Remove_Friend#}</th>
				{foreach from=$friends item=myfriend}
				{php}
					$this->_vars['friend_avatar'] = get_avatar('small', $this->_vars['myfriend']['user_avatar_source'], $this->_vars['myfriend']['user_login'], $this->_vars['myfriend']['user_email']);
					$this->_vars['profileURL'] = getmyurl('user2', $this->_vars['myfriend']['user_login'], 'profile');
					$this->_vars['removeURL'] = getmyurl('user_add_remove', $this->_vars['myfriend']['user_login'], 'removefriend');
				{/php}
				<tr>
					<td width="20"><img src="{$friend_avatar}" alt="{$myfriend.user_login} avatar" /></td>
					<td><a href="{$profileURL}">{$myfriend.user_login}</a></td>
					<td align="center"><a href="{$my_pligg_base}/module.php?module=simple_messaging&view=compose&return={$templatelite.server.REQUEST_URI|urlencode}&to={$myfriend.user_login}"><img src="{$my_pligg_base}/templates/{$the_template}/images/icons/user_message.png" alt="" /></a></td>
					<td align="center"><a href="{$removeURL}"><img src="{$my_pligg_base}/templates/{$the_template}/images/icons/user_delete.png" /></a></td>
				</tr>
				{/foreach}
			</table>
			{else}
				<div class="msg_warning2">{$user_username} {#PLIGG_Visual_User_Profile_No_Friends#}</div>
			{/if}
			<div class="msg_warning">
				<img src="{$my_pligg_base}/templates/{$the_template}/images/icons/friends2.png" alt="" />
				<a href="{$user_url_friends2}"><span class="icon_controls propercase">{#PLIGG_Visual_User_Profile_View_Friends_2#}</span></a>
			</div>
		</fieldset>
		{/if}
		{* VIEW FRIENDS 2 *}
		{if $user_view eq 'viewfriends2'}
		<br />
		<fieldset>
			<legend>{#PLIGG_Visual_User_Profile_Viewing_Friends_2a#}</legend>
			{if $friends}
			<table cellpadding="0" cellspacing="0" class="friends2">
				<th align="left" colspan="2">{#PLIGG_Visual_User_Profile_Username#}</th>
				<th width="60">{#PLIGG_Visual_User_Profile_Message#}</th>
				{foreach from=$friends item=myfriend}
				{php}
					$this->_vars['friend_avatar'] = get_avatar('small', $this->_vars['myfriend']['user_avatar_source'], $this->_vars['myfriend']['user_login'], $this->_vars['myfriend']['user_email']);
					$this->_vars['profileURL'] = getmyurl('user2', $this->_vars['myfriend']['user_login'], 'profile');
					$this->_vars['removeURL'] = getmyurl('user_add_remove', $this->_vars['myfriend']['user_login'], 'removefriend');
				{/php}
				<tr>
					<td width="20"><img src="{$friend_avatar}" alt="{$myfriend.user_login} avatar" /></td>
					<td><a href="{$profileURL}">{$myfriend.user_login}</a></td>
					<td width="60" align="center"><a href="{$my_pligg_base}/module.php?module=simple_messaging&view=compose&to={$myfriend.user_login}&return={$templatelite.server.REQUEST_URI|urlencode}"><img src="{$my_pligg_base}/templates/{$the_template}/images/icons/user_message.png" alt="" /></a></td>
				</tr>
				{/foreach}
			</table>
			{else}
				<div class="msg_warning2">{#PLIGG_Visual_User_Profile_No_Friends_2#}</div>
			{/if}
			<div class="msg_warning">
				<img src="{$my_pligg_base}/templates/{$the_template}/images/icons/friends.png" alt="" />
				<a href="{$user_url_friends}"><span class="icon_controls propercase">{#PLIGG_Visual_User_Profile_View_Friends#}</span></a>
			</div>
		</fieldset>		
		{/if}
		{* ADD FRIEND *}
		{if $user_view eq 'addfriend'}
		<div class="msg_success">{#PLIGG_Visual_User_Profile_Friend_Added#}</div>
		{if $Allow_Friends neq "0"}
		<div class="msg_warning">
			<img src="{$my_pligg_base}/templates/{$the_template}/images/icons/friends.png" alt="" />
			<a href="{$user_url_friends}"><span class="icon_controls propercase">{#PLIGG_Visual_User_Profile_View_Friends#}</span></a>
			&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
			<img src="{$my_pligg_base}/templates/{$the_template}/images/icons/friends2.png" alt="" />
			<a href="{$user_url_friends2}"><span class="icon_controls propercase">{#PLIGG_Visual_User_Profile_View_Friends_2#}</span></a>
		</div>
		{/if}
		{/if}		
		{* REMOVE FRIEND *}
		{if $user_view eq 'removefriend'}
		<div class="msg_success">{#PLIGG_Visual_User_Profile_Friend_Removed#}</div>
		{if $user_login neq $user_logged_in}
		<div class="msg_warning">
			<img src="{$my_pligg_base}/templates/{$the_template}/images/icons/friends.png" alt="" />
			<a href="{$user_url_friends}"><span class="icon_controls propercase">{#PLIGG_Visual_User_Profile_View_Friends#}</span></a>
			&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
			<img src="{$my_pligg_base}/templates/{$the_template}/images/icons/friends2.png" alt="" />
			<a href="{$user_url_friends2}"><span class="icon_controls propercase">{#PLIGG_Visual_User_Profile_View_Friends_2#}</span></a>
		</div>
		{/if}
		{/if}
		{* SETTINGS *}
		{if $user_view eq 'setting'}
		<br />
		{checkActionsTpl location="tpl_pligg_profile_settings_start"}
		<form action="{$my_pligg_base}/user_settings.php?login={$user_username}" method="post">
			{$hidden_token_user_settings}
			{if $Allow_User_Change_Templates}
			<fieldset>
				<legend>Choose Your Template</legend>
				<select name="template">
					<option value="">Choose Your Template</option>
					{foreach from=$templates item=template}
					<option {if $template==$current_template}selected="selected"{/if}>{$template}</option>
					{/foreach}
				</select>
			</fieldset>
			{/if}
			<fieldset>
				<legend>{#PLIGG_Visual_User_Setting_Categories#}</legend>						
				<ul class="settings clearfix">
				{foreach from=$category item=cat name="cate"}
					<li><input type="checkbox" name="chack[]" value="{$cat.category__auto_id}" {if !in_array($cat.category__auto_id,$user_category)} checked="checked"{/if} /> <span class="radio_pos">{$cat.category_name}</span></li>
				{/foreach}
				</ul>
			</fieldset>
			<input type="submit" name="submit" value="Update Settings" class="submit_button" />
		</form>
		{checkActionsTpl location="tpl_pligg_profile_settings_end"}
		{/if}		
		
		{checkActionsTpl location="tpl_pligg_profile_end"}
		{if isset($user_page)}<div class="asearch_result">{$user_page}</div>{/if}
		{if isset($user_pagination)}{checkActionsTpl location="tpl_pligg_pagination_start"}{$user_pagination}{checkActionsTpl location="tpl_pligg_pagination_end"}{/if}	
	</div>